{% extends "master.html" %}
{% block subtitle %} - 主面板 - 退货管理 - 查询售出商品{% endblock %}

{% block extJS %}
<script language="JavaScript" type="text/javascript">
//<![CDATA[
    
//]]>
</script>
{% endblock %}

{% block main %}
<div class="container">
    <div class="row">
        <ol class="breadcrumb">
          <li><a href="{{url_for('bpRoot.view')}}">主面板</a><span class="divider">\</span></li>
          <li><a href="{{url_for('bpRg.view')}}">退货管理</a><span class="divider">\</span></li>
          <li class="active">查询售出商品</li>
        </ol>
    </div>
    <div class="row">
        {{mymacros.render_search_form(form,3)}}
    </div>
    <div class="row">
        <div class="btn-toolbar pull-right">
            <div class="btn-group"><button type="button" class="btn btn-default" onclick="$('.searchForm').submit()">{{BTN_SEARCH}}</button></div>
            {% if getAllPermission(['RGN_CREATE',]) %}
            <div class="btn-group"><a href="{{url_for('bpRg.view',action='add')}}" class="btn btn-primary">创建退货单</a></div>
            {% endif %}
        </div>
    </div>
    
    
    <div class="row">
        <form method="POST" action="/rg/add" class="dataForm">
        <table class="table table-bordered">
            <thead>
                <tr>
                    <td><input type="checkbox" onclick="selectall(this,'pdt')"/>全选</td>
                    <td>商品编号</td>
                    <td>商品名称</td>
                    <td>销售店铺</td>                   
                    <td>销售时间</td>
                    <td>相关信息</td>
                </tr>
            </thead>
            <tbody>
                {% for (pdt,sp,ip) in records %}
                    <tr>
                        <td><input type="checkbox" name="pdt" value="{{pdt.id}}"/></td>
                        <td><a href="{{url_for('bpPdt.view',action='view',id=pdt.id)}}">{{pdt.no}}</a></td>
                        <td>{{pdt.name}}</td>
                        <td>{{sp.name}}</td>
                        <td>{{ip.createTime|ft}}</td>
                        <td><a href="{{url_('.view',action='viewRelated',pdtID=pdt.id,spID=sp.id)}}">查看</a></td>
                    </tr>
                {% endfor %}
            <tbody>
        </table>
        </form>
    </div>
</div>
{% endblock %}